package map;

import java.util.LinkedHashMap;//how linkedhashmap maintains insertion order????
import java.util.Map;

public class LinkedHashMapTest {
	public static void main(String[] args) {
		LinkedHashMap<Integer,String> lhm = new LinkedHashMap<Integer,String>();
		lhm.put(01, "vibhanshu");
		lhm.put(03, "rajeev");
		lhm.put(10, "ram");
		lhm.put(05, "praveen");
		lhm.put(01, "rajeev");
		lhm.put(04, "sitanshu");
		
		for(Map.Entry m:lhm.entrySet()){
			System.out.println(m.getKey()+" "+m.getValue());
		}
	}
	/**
	 * It is same as HashMap instead maintains insertion order.
	 * A LinkedHashMap contains values based on the key. It implements the Map interface and extends HashMap class.
       It contains only unique elements.
       It may have one null key and multiple null values.
	 * 
	 */

}
